﻿<%@ Page Language="C#" MasterPageFile="~/Masterpage/CommonPage.master" AutoEventWireup="true" CodeFile="AddNews.aspx.cs" Inherits="Portal_News_AddNews" ValidateRequest="false" EnableEventValidation="true" %>
<%@ Register TagPrefix="editor" Assembly="WYSIWYGEditor" namespace="InnovaStudio" %>
<%@ Register Assembly="Expo.Training.BRule" Namespace="Expo.Training.BRule.Controls" TagPrefix="CC" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<!--pagenav-->
<div class="pagenav"><strong>您现在的位置：</strong> 我的管理平台 > <a href="Default.aspx">新闻管理</a> > 添加新闻</div>
<!--pagenav end-->
<div style="overflow:auto;">
    <!--paneltitle-->
    <div class="paneltitle">新闻基本信息</div>
     <div class="paneladd">
         <input type="button" class="btn" value="返回" onclick="javascript:window.location.href = 'Default.aspx';" />
    </div>
</div>
<div class="">
	<table class="editortable" cellspacing="1">
        <tr class="editortr">
        	<th class="editorth" width="20%"><div>新闻标题：</div></th>
            <td class="editortd"><asp:TextBox ID="txt_Title" runat="server" CssClass="txtBox" MaxLength="50" Width="300px" /> &nbsp;<font color="red">*</font><span id="sp_BulletinT_error" class="note2"></span></td>
        </tr>
        <tr class="editortr" style="height:300px;">
        	<th class="editorth"><div>新闻内容：</div></th>
            <td class="editortd">
                 <CC:CecEditor4 runat="server" ID="ED_Editor" AllowFileManager="true" EditorWidth="590" EditorHeight="260" ResizeType="1" ScriptFile="../../kindeditor4/kindeditor.js" UploadHandle="../../KindEditor4/upload_json.ashx" FileManageHandle="../../KindEditor4/file_manager_json.ashx" ResizeMode="1"></CC:CecEditor4>&nbsp;<font color="red">*</font><span id="sp_new_error" class="note2"></span>
            </td>
        </tr>
         <tr class="editortr">
        	<th class="editorth"><div>状态：</div></th>
            <td class="editortd">
                <asp:RadioButton ID="rbt_m" Text="发布" GroupName="x" Checked="true" runat="Server" />
                <asp:RadioButton ID="rbt_w" Text="隐藏" GroupName="x" runat="server" />
                &nbsp;<font color="red">如果需要修改，请先“隐藏”；如确认无误选择“发布”，待管理进行审核</font>
            </td>
        </tr>
        <tr class="editortr">
        	<th class="editorth"><div>类型：</div></th>
            <td class="editortd">
                <asp:RadioButton ID="rbt_y" Text="慈溪社区快讯" GroupName="y" Checked="true" runat="Server" />
                <%--<asp:RadioButton ID="rbt_n" Text="动态" GroupName="y"  runat="server" />--%>
                <!--<asp:RadioButton ID="rbt_o" Text="法规" GroupName="y"  runat="server" />
                <asp:RadioButton ID="rbt_c" Text="其他" GroupName="y"  runat="server" />-->
                <asp:RadioButton ID="rbt_n" Text="慈溪最新公告" GroupName="y"  runat="server" />
                <asp:RadioButton ID="rbt_p" Text="慈溪图片新闻" GroupName="y"  runat="server" />
                <asp:RadioButton ID="rbt_t" Text="慈溪时政新闻" GroupName="y"  runat="server" />
                <asp:RadioButton ID="rbt_h" Text="悬浮" GroupName="y"  runat="server" Visible="false"/>
                <br />
                <asp:RadioButton ID="rbt_y_bm" Text="巴马社区快讯" GroupName="y" runat="Server" />
                <asp:RadioButton ID="rbt_n_bm" Text="巴马最新公告" GroupName="y"  runat="server" />
                <asp:RadioButton ID="rbt_p_bm" Text="巴马图片新闻" GroupName="y"  runat="server" />
                <asp:RadioButton ID="rbt_t_bm" Text="巴马时政新闻" GroupName="y"  runat="server" />
            </td>
        </tr>
        <tr class="editortr">
            <th class="editorth"><div>置顶：</div></th>
            <td class="editortd">
                <asp:RadioButton value="1" onclick="javascript:topChange(this);" ID="rbt_Yes" Text="是" GroupName="top" runat="server" />
                <asp:RadioButton value="" onclick="javascript:topChange(this);" ID="rbt_No" Text="否" GroupName="top" runat="server" Checked="true" />
                <label style="display:none;" id="lbl_TopExpired">&nbsp;&nbsp;下线时间：
                <input runat="server" id="txt_TopExpired" onclick="javascript:JSCalendar(this);" /></label>
            </td>
        </tr>
        <tr class="editortr">
        	<th class="editorth" width="20%"><div>关键字：</div></th>
            <td class="editortd"><asp:TextBox ID="txt_tag" runat="server" CssClass="txtBox" MaxLength="50" Width="300px" /> &nbsp;<font color="red">关键字以'|'隔开</font></td>
        </tr>
        <tr class="editortr">
    	    <th class="editorth"><div>缩略图：</div></th>
            <td class="editortd">
                <input id="File1" type="file" contenteditable="false" runat="server" /><asp:Literal ID="lt_tip" runat="server" Text="<font color='#999999'>[图片格式必须为.jpg,.jpeg,.png,.gif]</font>" /><asp:Literal ID="lt_Header" runat="server"/>
                &nbsp;</td>
        </tr>
        <tr class="editortr" name="tr_pdf" style="display:none;">
    	    <th class="editorth"><div>PDF文件：</div></th>
            <td class="editortd">
                <input id="File2" type="file" contenteditable="false" runat="server" /><asp:Literal ID="lt_tip2" runat="server" Text="<font color='#999999'>[格式必须为.pdf]</font>" /><asp:Literal ID="lt_Header2" runat="server"/>
                &nbsp;</td>
        </tr>
        <tr class="editortr">
        	<th class="editorth"><div></div></th>
            <td class="editortd">
                <asp:Button ID="btn_UP" CssClass="btn" runat="server" OnClick="DoAdd" Text="确认添加" />
            </td>
        </tr>
        </table>
 </div>
 <script type="text/javascript">
     function topChange(ele) {
         if (jQuery(ele).val()) {
             jQuery("#lbl_TopExpired").show();
         }
         else {
             jQuery("#lbl_TopExpired").hide();
         }
     }
     jQuery("#<%= rbt_y.ClientID %>").click(function() {
         jQuery("tr[name='tr_pdf']").hide();
     });
     jQuery("#<%= rbt_n.ClientID %>").click(function() {
         jQuery("tr[name='tr_pdf']").show();
     });
//     jQuery("#<%= rbt_o.ClientID %>").click(function() {
//         jQuery("tr[name='tr_pdf']").show();
//     });
//     jQuery("#<%= rbt_c.ClientID %>").click(function() {
//         jQuery("tr[name='tr_pdf']").show();
//     });
     jQuery("#<%= rbt_y.ClientID %>").attr(function() {
         jQuery("tr[name='tr_pdf']").hide();
     });
     jQuery("#<%= rbt_n.ClientID %>").attr(function() {
         jQuery("tr[name='tr_pdf']").show();
     });
//     jQuery("#<%= rbt_o.ClientID %>").attr(function() {
//         jQuery("tr[name='tr_pdf']").show();
//     });
//     jQuery("#<%= rbt_c.ClientID %>").attr(function() {
//         jQuery("tr[name='tr_pdf']").show();
//     });
 </script>
</asp:Content>

